package com.haiyi.software.app.basic;

import java.util.ArrayList;
import java.util.List;
import java.util.Map;

import android.app.Activity;
import android.os.Bundle;

import com.google.gson.JsonObject;
import com.haiyi.software.app.R;
import com.haiyi.software.ui.controller.WatingProgressDialog;
import com.loopj.android.http.AsyncHttpClient;
import com.loopj.android.http.RequestParams;

public abstract class ActivityBasic extends Activity {

	protected WatingProgressDialog watingDialog;

	private List<Map<String, Object>> dataSource = new ArrayList<Map<String, Object>>();

	protected String str_server = null;

	protected List<Map<String, Object>> getDataSource() {
		return dataSource;
	}

	protected Boolean isWork = false;

	protected Boolean getIsWork() {

		return isWork;
	}

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		// TODO 自动生成的方法存根
		super.onCreate(savedInstanceState);

		str_server = this.getResources().getString(R.string.URL);

		watingDialog = new WatingProgressDialog(this,
				R.style.WatingProgressDialog);

	}

	protected void setDataSource(List<Map<String, Object>> dataSource) {
		this.dataSource = dataSource;
	}

	// protected abstract void requestFinish(Object... args);

	protected abstract void requestFinish(JsonObject jsonObjectReturn);

	protected abstract void requestNetworkData(Object... args);

	protected abstract void requestError();

}
